#ifndef _TIMER_H_
#define _TIMER_H_

#ifdef _WIN32
#pragma once
#endif

/**
 * 01.03.12 - Steven Hartin - Original file creation
 */

// Turns all values into milliseconds
#define TIME_PRECISION 1.0

#include <Windows.h>
#include <Mmsystem.h>

class CTimer
{
public:
    CTimer(double dTime);
    CTimer();

    void setTime(const double dTime);
    void setTime();
    const double get_time() const;

    const double getTimeDifference(const CTimer &other) const;
    const double getTimeDifference(const double dOther) const;
    const double getTimeDifference() const;

    CTimer operator-(const CTimer &other) const;
    CTimer operator-(const double dOther) const;

    CTimer operator+(const CTimer &other) const;
    CTimer operator+(const double dOther) const;

    const CTimer &operator-=(const CTimer &other);
    const CTimer &operator-=(const double dOther);

    const CTimer &operator+=(const CTimer &other);
    const CTimer &operator+=(const double dOther);
    
private:
    double m_dTime;
};

#endif